/**
 * @Author yinyunqi
 * @date 2018年1月31日
 * @Content 
 */
package com.yongqi.service.back;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yongqi.mapper.back.EmailMapper;
import com.yongqi.model.back.Email;

@Service
public class EmailService {
    @Autowired
    EmailMapper emailMapper;
    /**
     * 添加邮件
     * @param email
     */
    public void addEmail(Email email) {
    	emailMapper.addEmail(email);
    }
    /**
     * 首页推送邮件
     * @param map
     * @return
     */
    public List<Email> emailPushQuery(Map<String, String> map){
    	return emailMapper.emailPushQuery(map);
    }
    /**
     * 后台-邮件查询
     * @param map
     * @return
     */
    public List<Email> backEmailQuery(Map<String, String> map) {
    	return emailMapper.backEmailQuery(map);
    }
    /**
     * 后台-邮件删除
     * @param map
     */
    public void backEmailDelete(Map<String, String> map) {
    	emailMapper.backEmailDelete(map);
    }
    /**
     * 后台-邮件详细
     * @param map
     * @return
     */
    public List<Email> backEmailDetail(Map<String, String> map){
    	return emailMapper.backEmailDetail(map);
    }
    /**
     * 邮件查询
     * @param map
     * @return
     */
    public List<Email> emailQuery(Map<String, String> map) {
    	return emailMapper.emailQuery(map);
    }
    /**
     * 修改邮件未读状态
     */
    public void changeReaded(Map<String, String> map) {
    	emailMapper.changeReaded(map);
    }
    /**
     * 删除邮件
     */
    public void deleteEmail(Map<String, String> map) {
    	emailMapper.deleteEmail(map);
    }
}

